﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkyFab.Master" AutoEventWireup="true" CodeBehind="QueryYearPrice.aspx.cs" Inherits="Web.QueryYearPrice" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            text-align: left;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:Label ID="FlashMessageLabel" runat="server"></asp:Label>
<h1>Check Price and Cost</h1>
    <div class="span-18">
    <fieldset>
    <legend>Search Product</legend>
    <p>
    <label>Category:</label>
    <asp:DropDownList ID="CategoryDropDownList" runat="server" 
                    AutoPostBack="True" 
                    onselectedindexchanged="CategoryDropDownList_SelectedIndexChanged" Width="150">
                </asp:DropDownList>

    <label>Product No:</label>
    <asp:DropDownList ID="ProductDropDwonList" runat="server" 
                    AutoPostBack="True" 
                    onselectedindexchanged="ProductDropDwonList_SelectedIndexChanged" Width="200">
                </asp:DropDownList>
    </p>

    <p>
    <label>Or Search by product No:</label>
    <asp:TextBox ID="SearchProductNoTextBox" runat="server" CssClass="text" Width="250"></asp:TextBox>
                <asp:Button ID="SearchButton" Text="Search" runat="server" 
                    onclick="SearchButton_Click"  CssClass="submitButton"/>
    </p>
    </fieldset>
    </div>

    <div class="span-18">
    <h3>Sales History (Last One Year)</h3>
    <p>
    <asp:GridView ID="SalesGridView" runat="server" AutoGenerateColumns="False" 
                    CssClass="gridview">
                    <Columns>
                        <asp:BoundField DataField="Date" DataFormatString="{0:d MMM, yyyy}" 
                            HeaderText="Date" />
                        <asp:BoundField DataField="VendorOrCustomer" HeaderText="Customer" />
                        <asp:BoundField DataField="Qty" HeaderText="Qty" />
                        <asp:BoundField DataField="Price" HeaderText="Price(USD)" />
                    </Columns>

                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
    </p>
    <hr />
    <h3>Purchase History (Last One Year)</h3>

    <p>
                <asp:GridView ID="PurchaseGridView" runat="server" AutoGenerateColumns="False" 
                    CssClass="gridview">
                    <Columns>
                        <asp:BoundField DataField="Date" DataFormatString="{0:d MMM, yyyy}" 
                            HeaderText="Date" />
                        <asp:BoundField DataField="VendorOrCustomer" HeaderText="Vendor" />
                        <asp:BoundField DataField="Qty" HeaderText="Qty" />
                        <asp:BoundField DataField="Price" HeaderText="Price(SGD)" />
                    </Columns>

                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>

    </p>
    </div>  
       
</asp:Content>
